//乘客
//模块的构造方法
function Passenger(rs) {
	this.id=rs.id;
	this.username=rs.username;
	this.realname=rs.realname;
	this.password=rs.password;
	this.status=rs.status;
	this.phone=rs.phone;
	this.canuse=rs.canuse;
}
//定义表名
Passenger.entityName = 'passenger';
//主键
Passenger.entityIndex = 'id';
//redis过期时间
Passenger.entityExpiration = 60*5;
Passenger.entityCreated = 'created';
//属性
Passenger.propNamesAsArray = [ 'id', 'username', 'realname', 'password','phone','status','canuse'];
//获得class用于redis删除对象
Passenger.prototype.getClass = function() {
    return Passenger;
};
//获得表名
Passenger.prototype.getEntityName = function() {
    return Passenger.entityName;
};
//获得主键
Passenger.prototype.getEntityIndex = function() {
    return Passenger.entityIndex;
};
//获得过期时间
Passenger.prototype.getEntityExpiration = function() {
    return Passenger.entityExpiration;
};

Passenger.prototype.getEntityCreated = function() {
    return Passenger.entityCreated;
};
//获得属性名称列表
Passenger.prototype.getPropNamesAsArray = function() {
    return Passenger.propNamesAsArray;
};
//获得属性名称列表
Passenger.prototype.asArray = function() {
    return [
        this.id,
        this.username,
        this.realname,
        this.password,
        this.phone,
        this.status,
        this.canuse
    ];
};
module.exports.Passenger = Passenger;